<?php
	if (!session_start()) session_start();
	if (!isset($_SESSION['kiemtradangnhapthinguyet']) || $_SESSION['kiemtradangnhapthinguyet']!=1) {
		header('location: ../../../index.php');
		die();
	}
	$table = "contact";
	$id = $_GET['id'];
	$kq=$qt->get_by_thutu($table,$id);
	$row=mysql_fetch_assoc($kq);
	if(isset($_POST['ok']))
	{	

			echo "<script>alert('Sửa dữ liệu thành công !!!');history.go(-2);</script>";
	}
?>	
	
<script type="text/javascript">
function isTest() {
	if (document.getElementById("ten_vi").value=="") {
		alert("You have not entered enough information.");
		return false;
	}
	if (document.getElementById("ten_en").value=="") {
		alert("You have not entered enough information.");
		return false;
	}
	
    return true;
}	
</script>		
            	<div class="dangnhap_title">
                <a href="index.php" style="color:#F8991D;" title="Trang chủ">Trang chủ</a>
                <span style="font-size:9px;">>></span> 
                Thông tin khác
                <span style="font-size:9px;">>></span> 
                <a href="index.php?p=<?php echo $table; ?>_quanly" style="color:#F8991D;">Liên hệ</a>  
            	</div>
            	<form method="post" action="index.php?p=<?php echo $table; ?>_sua" onSubmit="return isTest();">
            	<input type="hidden" name="id" value="<?php echo $id; ?>" />
                <div class="dangnhap_col">
                    <div class="dangnhap_col_title" style="font-size:22px; color:#0E6BBB; width: 90%;">
                        Information                    </div>
                </div>
                <div class="dangnhap_col">
                    <div class="dangnhap_col_title">
                        &nbsp; &nbsp; &nbsp;- Họ tên
                    </div>
                    <div class="dangnhap_col_input">
                        <?=$row['hoten'];?>
                    </div>
                </div>
                <div class="dangnhap_col">
                    <div class="dangnhap_col_title">
                        &nbsp; &nbsp; &nbsp;- Quốc gia
                    </div>
                    <div class="dangnhap_col_input">
                        <? $iddichvu=$row['iddichvu'];
							$dv=$qt->get_by_thutu("dichvu",$iddichvu);
							$row_dv=mysql_fetch_assoc($dv);
						?>
                        <?=$row_dv['ten_vi']?>
                    </div>
                </div>
                <div class="dangnhap_col">
                    <div class="dangnhap_col_title" >
                        &nbsp; &nbsp; &nbsp;- Ngày sinh:
                    </div>
                    <div class="dangnhap_col_input">
                         <?php echo date('d/m/Y',strtotime($row['ngaysinh'])); ?> 
                    </div>
                </div>
                <div class="dangnhap_col">
                    <div class="dangnhap_col_title" >
                        &nbsp; &nbsp; &nbsp;- Số lượng người đi:
                    </div>
                    <div class="dangnhap_col_input">
                         <?=$row['nguoidi'];?>
                    </div>
                </div>
                <div class="dangnhap_col">
                    <div class="dangnhap_col_title" >
                        &nbsp; &nbsp; &nbsp;- Thời gian đi:
                    </div>
                    <div class="dangnhap_col_input">
                         <?php echo date('d/m/Y',strtotime($row['thoigiandi'])); ?> 
                    </div>
                </div>
                <div class="dangnhap_col">
                    <div class="dangnhap_col_title" >
                        &nbsp; &nbsp; &nbsp;- Thời gian kết thúc:
                    </div>
                    <div class="dangnhap_col_input">
                         <?php echo date('d/m/Y',strtotime($row['thoigianve'])); ?> 
                    </div>
                </div>
                <div class="dangnhap_col">
                    <div class="dangnhap_col_title" >
                        &nbsp; &nbsp; &nbsp;- Email:
                    </div>
                    <div class="dangnhap_col_input">
						<?=$row['email'];?>
                    </div>
                </div>
                <div class="dangnhap_col">
                    <div class="dangnhap_col_title" >
                        &nbsp; &nbsp; &nbsp;- Điện thoại:
                    </div>
                    <div class="dangnhap_col_input">
						<?=$row['dienthoai'];?>
                    </div>
                </div>
                <div class="dangnhap_col">
                    <div class="dangnhap_col_title" >
                        &nbsp; &nbsp; &nbsp;- Nội dung:
                    </div>
                    <div class="dangnhap_col_input">
						<?=$row['noidung'];?>
                    </div>
                </div>
                
               	</form>